package edu.sctu.jarime.june.day20150615.copyFile;

import edu.sctu.jarime.june.day20150615.copyFile.CopyFileByDifferentWay;

import java.io.File;

/**
 * Created by user19 on 2015/6/15.
 */
public class CopyFileTest {
    public static void main(String[] args) {

        long start = System.currentTimeMillis();
        try {
            CopyFileByDifferentWay.copyFileByByte(new File("D:\\lili\\迭代器.txt"),new File("D:\\lili\\迭代器1"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);



        long start1 = System.currentTimeMillis();
        try {
            CopyFileByDifferentWay.copyFileByByteArray(new File("D:\\lili\\迭代器.txt"), new File("D:\\lili\\迭代器2"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        long end1 = System.currentTimeMillis();
        System.out.println(end1-start1);



        long start2 = System.currentTimeMillis();
        try {
            CopyFileByDifferentWay.copyFileByData(new File("D:\\lili\\迭代器.txt"), new File("D:\\lili\\迭代器3"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        long end2 = System.currentTimeMillis();
        System.out.println(end2-start2);




        long start3 = System.currentTimeMillis();
        try {
            CopyFileByDifferentWay.copyFileByData(new File("D:\\lili\\迭代器.txt"), new File("D:\\lili\\迭代器4"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        long end3 = System.currentTimeMillis();
        System.out.println(end3-start3);
    }
}
